package com.avic.rong.goodsSort.api.secondListApi;

import com.avic.rong.api.HttpPostService;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

/**
 * Created by Chenjiaxin on 2019/7/24 14:10
 * E-Mail Address：16601203965@163.com
 */
public class GoodsSortSearchAllGjSxApi extends BaseApi {

    //    private String state;
    private int types;
//    private String keyword;
//    private int catIds;
        private String attrPro ;
    private int typeId;
//    private int sort;
//    private String postTime ;
//    private int pageNo ;
//    private int pageSize ;

    public GoodsSortSearchAllGjSxApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener, int types, int typeId,String attrPro) {
        super(rxAppCompatActivity, listener);
//        this.catIds = catIds;
        this.types = types;
//        this.keyword = keyword;
        this.typeId = typeId;
        this.attrPro = attrPro;
//        this.state = state;
    }

    public void setAttrPro(String attrPro) {
        this.attrPro = attrPro;
    }

    //    public GoodsSortSearchAllGjApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener, int catIds, int sort, String state) {
//        super(rxAppCompatActivity, listener);
//        this.catIds = catIds;
//        this.sort = sort;
//        this.state = state;
//    }
    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
//        if (state.equals("1"))
        return service.searchAllGjSx(types,typeId,attrPro);
//        else
//            return service.searchAllGjTime(catIds, sort);
    }

}
